package edu.cqie.smartfarm.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

@Data
@ApiModel(value = "圈舍DTO对象", description = "圈舍DTO对象")
public class BarnDTO {
    @ApiModelProperty(value = "牧场id")
    @NotNull(message = "牧场id不能为空")
    private Integer farmId;

    @ApiModelProperty(value = "圈舍名称")
    @NotNull(message = "圈舍名称不能为空")
    @Length(max = 50, message = "圈舍名称长度不能超过50个字符")
    private String barnName;
}
